03. Encounter Representation
Encounter Representation
ND320 AIHCND C01 L03 A03 Encounter Representation V2
Encounter Representation Key Points
Encounter: “An interaction between a patient and healthcare provider(s) for the purpose of providing healthcare service(s) or assessing the health status of a patient.”
What is an encounter?
The definition of an encounter commonly used for EHR records comes from the Health Level Seven International (HL7), the organization that sets the international standards for healthcare data. As the definition states, it is essentially an interaction between a patient and a healthcare professional(s).
It usually refers to doctors visits and hospital stays.
How do we aggregate line level at encounter level?
Create a column list for the columns you would use to group. Likely these would be:
- "encounter_id"
- "patient_id"
- "principal_diagnosis_code"
Create column list for the other columns not in the grouping
Transform your data into a new dataframe. You can use
groupby()
andagg()
functions for thisThen you can do a quick inspection of the result by grabbing one of the patient records and to compare the output of the original dataframe and the newly transformed encounter dataframe.
Note: The data used in the walkthrough was created just to show you how this would work. You'll practice this more in later exercises as well.
Additional Resources
Code
If you need a code on the https://github.com/udacity.